<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>修改密码</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="res/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="res/layui/css/admin.css" media="all">
  <link rel="stylesheet" href="res/layui/css/login.css" media="all">
<title>修改密码</title>
</head>
<body>
	<form class="layui-form" action="updatepwd.action">
		  <div class="layui-form-item">
		    <label class="layui-form-label">原密码</label>
		    <div class="layui-input-inline">
		      <input type="password" name="oldPassword" id="oldPassword" required lay-verify="required" placeholder="请输入原密码" autocomplete="off" class="layui-input">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">新密码</label>
		    <div class="layui-input-inline">
		      <input type="password" name="password" id="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">再次输密码</label>
		    <div class="layui-input-inline">
		      <input type="password" name="repassword" id="repassword" required lay-verify="required" placeholder="请再输入密码" autocomplete="off" class="layui-input">
		    </div>
		  </div>
		  
		  <div class="layui-form-item">
		    <div class="layui-input-block">
		      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
		      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
		    </div>
		  </div>
	</form>
 
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    console.log(data);
    	if(data == 2){
    		
    	}
    return false;
  });
});
</script>
</body>
</html>